/*
 * @Author: namelll 2677065112@qq.com
 * @Date: 2023-06-01 15:16:35
 * @LastEditors: namelll 2677065112@qq.com
 * @LastEditTime: 2023-06-06 14:32:48
 * @FilePath: \vue3-ts-project\src\components\index.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
//引入全局组件
import SvgIcon from './SvgIcon/index.vue'
import Pagination from './Pagination/index.vue'
import Category from './Category/index.vue'
//引入element-plus提供的全部图标组件
import * as ElementPlusIconsVue from '@element-plus/icons-vue'

const allGlobalComponent = { SvgIcon, Pagination,Category }
// console.log(allGlobalComponent)
export default {
    //
    install(app: any) {
        Object.keys(allGlobalComponent).forEach(key => {
            // console.log(key)
            //注册为全局组件
            app.component(key, allGlobalComponent[key])
        });
        //进行全局注册
        for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
            app.component(key, component)
        }
    }
}